# # 使用print打印一个数据
# print(True)
# # 使用print打印多个数据
# print("达姆老婆:","周冬雨","迪丽热巴",666)
# # 如何改变数据之间的连接方式 默认是使用空格相连, 可以通过sep标识符进行控制
# print("达姆老婆:","周冬雨","迪丽热巴",666,sep="❤",end="\n")
# # 如何控制print的换行逻辑 默认情况下每个print语句最终都会换行! 可以通过end标识符来控制
# print("文创人工智能的帅哥美女们!!!",end="*")
# print("蓝桥杯 加油!!!")
#
# # 打印当前的日期
# year = "2024"
# month = 11
# day = 29
# h = 10
# m = 52
# s = 45.3
# # print(year,month,day,h,m,s,sep="-")
# # %d在打印字符串时可以作为数字的占位!!
# # %s在打印字符串时可以作为字符串的占位!!
# # %f在打印字符串时可以作为浮点数的占位!!
# print("%s-%d-%d %d:%d:%f❥(^_-)" % (year,month,day,h,m,s))

# 输出99乘法口诀表
# for i in range(9):
#     for j in range(i+1):
#         print("%d*%d=%d" % (j+1,i+1,(i+1)*(j+1)),end="  ")
#     print()

# 输出99乘法口诀表  讲解错位
# for i in range(9):
#     for j in range(i+1):
#         if (j+1)==2 and ((i+1)==3 or (i+1)==4):
#          end = "   " #3个空格
#         else:
#          end = "  " #2个空格
#         print("%d*%d=%d" % (j+1,i+1,(i+1)*(j+1)),end=end)
#     print()




# 1. 打印矩形
# *******
# *******
# *******
# *******

# 每一次外层循环 内层循环要走5次
# for i in range(4): #外层循环控制行数
#     for j in range(7): #内层循环控制列数
#         print("*",end="")
#     print()

# for i in range(4): #外层循环控制行数
#     print("*" * 7)

# h = 8
# w = 7
# for i in range(h):
#     print("*" * w)



# 2. 打印直角三角形
#   *
#   ***
#   *****
#   *******
# for i in range(4):
#     for j in range(2*i+1):
#         print("*",end="")
#     print()
#
# for i in range(4): #外层循环控制行数
#     print("*" * (2*i+1))
#
# h = 8
# for i in range(h): #外层循环控制行数
#     print("*" * (2*i+1))


# 3.打印等腰三角形
#      *
#     ***
#    *****
#   *******

# h = 50
# for i in range(h):
#     for j in range(h-1-i):
#         print(" ",end="")
#     for j in range(2*i+1):
#         print("*",end="")
#     print()

n = 8
for i in range(n):
    print(" "* (n-1-i),"*" * (2*i+1))



#      *
#     ***
#    *****
#   *******
#    *****
#     ***
#      *























